    package mybook;//基础包
            //图书类，把书籍抽象成类，输入对应的属性
        public class MyBook {
                private String title;//书名
                private String author;//书的作者
                private String type;//书的类型
                private double price;//书的价格
                private boolean state;//书的状态

                public MyBook(String title, String author, String type, double price) {
                    this.title = title;
                    this.author = author;
                    this.type = type;
                    this.price = price;
                }

                public String getTitle() {
                    return title;
                }


                public void setTitle(String title) {
                    this.title = title;
                }

                public String getAuthor() {
                    return author;
                }

                public void setAuthor(String author) {
                    this.author = author;
                }

                public String getType() {
                    return type;
                }

                public void setType(String type) {
                    this.type = type;
                }

                public double getPrice() {
                    return price;
                }

                public void setPrice(double price) {
                    this.price = price;
                }

                public boolean isState() {
                    return state;
                }

                public void setState(boolean state) {
                    this.state = state;
                }

                @Override
                public String toString() {
                    return "MyBook{" +
                            "title='" + title + '\'' +
                            ", author='" + author + '\'' +
                            ", type='" + type + '\'' +
                            ", price=" + price +", state="+
                            (state == false ? "未被借出" : "已被借出") +

                            '}';
                }
            }